using System;
using System.Collections.Generic;
using System.Text;
using BuildingBasicDomain;
using CommonTypes.Events;

namespace BuildingStructuralElements
{
    /// <summary>
    /// Beam inherits from  StructuralElement  hierarhy
    /// beam class implements geometry features via _line class 
    /// and ILinear that provides the inteface for Line (actualy is implemented a 
    /// the multiple include pattern . Interface - Delegation)
    /// </summary>
    [Serializable]
    public class Beam :BeamType ,ICloneable
    {
        # region "Constructor "
        public Beam()
        {
        }
        #endregion
        
        /// <summary>
        /// beam contrsuctor with two nodes as parameters 
        /// </summary>
        /// <param HeaderName="StartingNode"></param>
        /// <param HeaderName="EndingNode"></param>
        public Beam(Node sNode,Node eNode) : base()
        {
            /*
            _line = new NodeLine (sNode, eNode);
            (_line .NodeList as MVCFramework .IDomainCollection ).OnExternalyChanged +=new EventHandler<EventArgs>(InternalNodes_OnExternalyHaveChanged);

            SectionManager.Inscatnce.GetSection(this, "HEA", "120");
            //Section = new SectionIRolled();
            */
        }
        /// <summary>
        /// Beam from beamelement2 Object 
        /// </summary>
        /// <param HeaderName="beamelement2">the beamelement2 that defines Beam</param>
        public Beam(ILine line) : base()
        {
            /*
            this._line = NodeLine.Create (_line.SNode, _line.ENode);
            (this._line.NodeList as MVCFramework.IDomainCollection).OnExternalyChanged += new EventHandler<EventArgs>(InternalNodes_OnExternalyHaveChanged);
            SectionManager.Inscatnce.GetSection(this, "HEA", "120");
          //  Section = new SectionIRolled();
             * */
        }
        
        # region "Interfaces implementation "

        //this is only a shalowcopy modify this 
        public Object Clone()
        {
           return this.MemberwiseClone();
        }

        public override string ToString()
        {
            return this.GetType().Name;

        }

        #endregion
    }
}
